<?php
elgg_register_event_handler('init', 'system', 'padelot_theme_init');

function padelot_theme_init()
{
	elgg_extend_view('css/elgg', 'padelot_theme/css');
	
	if (elgg_is_active_plugin('search')) {
		elgg_extend_view('page/elements/topbar', 'search/search_box');
		elgg_unextend_view('page/elements/header', 'search/search_box');
	}
	
	//Want our logo present, not Elgg's
	$site = elgg_get_site_entity();
	elgg_unregister_menu_item('topbar', 'elgg_logo');
	elgg_register_menu_item('topbar', array(
		'name' => 'logo',
		'href' => '/',
		'text' => "<h1 id=\"facebook-topbar-logo\">$site->name</h1>",
		'priority' => 1,
	));
}

?>